﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;

namespace weiqijiance
{
    public partial class JDTip : CCSkinMain
    {
        public JDTip(bool HXcy, bool hx, bool fq, bool dy, bool yd, bool yr)
        {
            InitializeComponent();
            check(HXcy,hx, fq, dy, yd, yr);
        }

        public void check(bool HXcy, bool JDhx, bool JDgas, bool JDno, bool JDsk, bool yr)
        {
            if (JDgas)
            {
                TIP_gassc.Text = "已经完成";
            }
            else
            {
                TIP_gassc.Text = "请完成自检";
            }

            if (yr)
            {
                TIP_YR.Text = "已经完成";
            }
            else
            {
                TIP_YR.Text = "请完成预热";
            }
            string sydj = "";
            string snox = "";
            //TIP_nosc.Text = "氮氧化合物烟度值：";
            if (JDsk)
            {
                //TIP_sksc.Text = "已经完成";
                sydj = "烟度值：已经完成；";
            }
            else
            {
                //TIP_sksc.Text = "请完成自检";
                sydj = "烟度值：请完成自检；";
            }
            if (JDno)
            {
                //TIP_nosc.Text = "已经完成";
                snox = "氮氧化合物：已经完成";
            }
            else
            {
                //TIP_nosc.Text = "请完成自检";
                snox = "氮氧化合物：请完成自检";
            }
            TIP_nosc.Text = sydj + snox;
            string qyhx = "", cyhx = "";
            if (JDhx)
            {
                qyhx = "汽油滑行：已经完成；";
            }
            else
            {
                qyhx = "汽油滑行：请完成自检；";
            }
            if (HXcy)
            {
                cyhx = "柴油滑行：已经完成";
            }
            else
            {
                cyhx = "柴油滑行：请完成自检";
            }
            TIP_hxsc.Text = qyhx + cyhx;
        }
        public mainform m_mainform;
        private void JDTip_Load(object sender, EventArgs e)
        {
            if (m_mainform.bqyx)
            {
                skinButton1.Visible = true;
                groupBox2.Visible = true;
            }
            if (m_mainform.bcyx)
            {
                skinButton2.Visible = true;
                groupBox3.Visible = true;
            }
        }

        private void skinBut_yure_Click(object sender, EventArgs e)
        {

            yure obj = new yure();
            obj.m_mainform = m_mainform;
            obj.ShowDialog();
        }

        private void skinButton1_Click(object sender, EventArgs e)
        {

            国标自检类.GBJZHX obj = new 国标自检类.GBJZHX();
            obj.m_mainform = m_mainform;
            // this.Close();
            obj.ShowDialog();
        }

        private void skinButton2_Click(object sender, EventArgs e)
        {

            JDHuaXing obj = new JDHuaXing();
            obj.m_mainform = m_mainform;
            obj.ShowDialog();
        }

        private void skinButton3_Click(object sender, EventArgs e)
        {

            yiqijianding obj = new yiqijianding();
            obj.m_mainform = m_mainform;
            obj.ShowDialog();
        }

        private void skinButton4_Click(object sender, EventArgs e)
        {

            btgyiqijianding obj = new btgyiqijianding();
            obj.m_mainform = m_mainform;
            obj.ShowDialog();
        }


        private void 刷新自检提醒ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            m_mainform.bsuozhi = false;
        }

        private void JDTip_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F8)
            {
                刷新自检提醒ToolStripMenuItem.Visible = true;
                //bkeydown = true;
            }

        }

        private void JDTip_KeyUp(object sender, KeyEventArgs e)
        {
            刷新自检提醒ToolStripMenuItem.Visible = false;

        }
    }
}
